refactored remove resource logic into special collection class