bug fixes for prob17, answer still not correct
problem 17 now correct