solved q2.59
solved q2.59