Finished common friends function