stripped newlines from input if it's there