better resource def