fixed parsing issue, implemented multipage search, small refactor