pull request from fabiorauber,  Resource based #11