Updated areFriends and areFriendsOfAuthor functions and tested