rewriting my parser