dapt exercises to functions and add algorithm comparison