rewritten cloneResource method
added destroy method