derive from Frank D.Luna`s book source code