make local fonction private and add some require() when a public function make some assumptions