changing to private function