refactoring end_turn to be cleaner