remove map and private function