solving the tie issue