updated methods for problem 1 and added problem 2 solution