Improving getResource