Make recordLength a public function