The chaos code