setting up tiebreaker function, still needs work...