input with new line test and code implemented