write simple parser