refactored woorld in class with objects