made it ready to use general error handling