Created sort by mutual friends algorithm