Add inputs for Algorithms, play with types in scala