added more testing and refactoring to next_turn