latest code, dia and sql model