add function to determine the active player