adding dbug to the demo
added comments
more tests