friends function tested and works

To the extent of my knowledge, friends function works