starting parsing function