add solution to problem 16
add solution to problem 17