added next steps of the algorithm
unit test for functions within algorithm