added restarting node logic