classify world functionality into a World class