added locations processing to create_resource