added parser constructor