working on friend functions