has code for saving friendsOrder after sorting, but not functional