remember position when stripping whitespace