add :on_reload option
refactor