passing user object instead of username for friend functions