cleaning up the code for readability - adding minor change to the debug code