put more functionality in compute_turn() function