completed parser_efficient along with unit test, checking that is equivalent to parser class