version 2.0 with working newline and spacebar