solution to 117
solution 116