main parser with unit test added