fixed do_parsing method