added deleteResource function