fixes mistake in the solution - answer now correct!

removes newline characters from the array