improved comments
added true/false DEBUG option to control console.log messages