add `on_loaded` hook
