treat newlines and carriage returns same as space
remove debug code