adds algorithms refactoring. removes hand potential