added auto-restart