fixed timing bug
modified debug output