working newline insertion