some more error handling