solution to problem 48 added