defining member function inside the class