removed unused function in algorithm