use enum ParseError for errors instead of strings