refactored algo js/html ID names