handling ties