fixed last newline problem in final hw4 solution