spaces and newline remove function added