renaming resource to resourceMap