Fixed input issues involving spaces

-changed input.next() to input.nextLine()