resource delete model function