WIP: working on protocol parser