added debug functionality
readme enhanced
added code example to the readme