correct way to create a resource