add restarting hooks