move utils to algorithms package