add some error-handling