Moved private function down