updated D.E and unit testing cases

maxProgLine not implemented, can't compile. change back to the
primitive way.