parsing correctly, working on exit