prom code optimize