added more verbose debugging console.log statements