deleting unnecessary resources