added solutions for problems 39,40,42,44