This discretion allows the judge to consider factors, including closeness of the case, the tactics of counsel, the conduct of the parties, and any other factors that may contribute to a fair allocation of the litigation burdens of litigation between winner and loser.