parse helper function updated