added checking for existing friendships