refactored algo var name