calling the correct public function