Added algo to document