created parser and fixed bugs