1. A method to improve data retention in an array of programmable memory cells comprising: defining a margin reference voltage that is different than a normal memory cell read voltage; reading a logic value content of at least one memory cell; using said margin reference voltage as a reference for comparison with said logic value content; comparing said logic value content of the at least one memory cell automatically to an expected logic value; and adjusting a programming parameter automatically if said memory cell logic value content is different than said expected logic value.