I do not understand the algorithm used in this implementation. Do you have an article or resource for this implementation to help me? Thanks