rewrote the createResources function to follow the rules more closely