restart logic