add solution to problem #42
add solution to problem #44