added functions for handling friendships