trim and organize resources