updated gatherResources method