refactors resource path