added some error-handling