code added to friends activity