Change model to resource