added solution for 39