MTPM ramped programming optimization methodology