added win, tie and counter functions