adding a debug mode for easier experimentation