MADISON, Wis. (AP) — U.S. Supreme Court Justice Antonin Scalia's death forced the rest of the court to learn how to work together to avoid ties, Justice Elena Kagan said during a stop Friday at the University of Wisconsin-Madison.

Kagan spoke for about an hour with UW Law School Dean Margaret Raymond as scores of law students, attorneys and judges listened. Raymond asked Kagan what role the high court can play in mending a politically polarized country and improving civil discourse.

Kagan acknowledged that many people see the court as mirroring the nation's political differences and the court ultimately must decide cases, not provide an example for how other governmental institutions should function. But she said Scalia's death in 2016 forced the remaining eight justices to work together more closely.

Justice Neil Gorsuch replaced Scalia earlier this year, but before he joined the court the justices worked hard to avoid 4-4 ties out of fear they'd been seen as incapable of doing their jobs, Kagan said.

"None of us wanted that to happen," she said. "It forced us to keep talking to each other. ... I'm actually hopeful that the effects of it will continue. All of us will remember not to stop the conversation too soon and all of us will remember the value of trying to find a place where we can agree or more of us can agree."

She didn't offer any specific examples of compromises on any cases. Raymond didn't ask Kagan about any cases pending before the court and Kagan didn't offer any comments about any specific issues.

She did joke that she was glad she wasn't the court's junior justice anymore now that Gorsuch is on board. She said the junior justice has to open the door during the justices' conference and deliver any coffee or files other justices have requested from their clerks. Earlier this year she had injured her foot and was in a walking boot but her colleagues still made her get up and open the door.

"Can I tell you how seriously people feel this is the job of the junior justice?" she said. "Now that's not my job anymore but after seven years when somebody knocks on the door I still go like this," she said, rising out of her chair.

The junior justice also has to sit on the court's cafeteria committee. Her tasks included reporting justices' complaints about too much salt in their soup and finding out why the good chocolate chip cookies had disappeared.

"This truly is a form of hazing," she said, drawing laughter from the crowd.

Kagan served as an attorney in former President Bill Clinton's administration and as dean of Harvard's law school. Then-President Barack Obama picked her to serve as the nation's first female solicitor general in 2009 and nominated her to replace retiring Justice John Paul Stevens in 2010. The Senate confirmed her later that year, making her the fourth female justice in Supreme Court history.

___

Follow Todd Richmond on Twitter at https://twitter.com/trichmond1