algorithm restarted