added problem 2 solution function and readme