added synchronized to addFriend
added comment to synchronized