fixed bugs introduced by color output.
Also, input now ignores case