added basic error handling