added on_refresh method