put the `error` check above this, then u don't need to check error.