solution for algorithm class