solution to problem 36 added