use member function where even you can and use friends only if needed