will refactor parser. it does too much logic at the moment.