Start implemention of parser function