added helpful debug messages that are enabled with DEBUG