Moved a private function down