first step in better error handling