Added debugmessage method.  some todos. thinking about tuning
implementation