refactor the resources