improvements in parser