added tieScore variable and printed tieScore