change id-proving equation to make it easier to understand
add missing _ in variable name
add new debug printf system

now use dpf() instead of printf().
and define DEBUG if you want it to be printed