Adding solution to problem 44