way better error handling