refactor: function -> public function