commit solution for problem 1.2