logic for getting/updating friends and profiles