better implementation of getting resources
Merge pull request #553 from georgebyelas/master

better implementation of getting resources