trying some more error handling