improved scanning of chars, added parser for chars