refactored to pass stdout to display instead of game