better resource API