fixed parsing and added tests with bench