Add notes about algorithm