added close public function