re-organize parser