for my algorithm class