Made random_str() a private function