Generating codes UPDATE