first pass at error handling