Modified resolveTies

Need to add notes for debugging and final output