use of generics for algorithm runner complete