added fun to print only when debugging is enabled
updates to comments and print fun only when debug is enabled.
updated demo with image
deleted old demo