created the addFriend function also put all the other two functions back in