added a public function to limit option count