implementing private function of the class