protocol parser