change one line about ref flipping coin