use MAX_RESTARTS instead of int literal