change private function to protected function