parsing working, fixed exiting