friendsOf function now working