giving less lines to error handling