added boolean to easily turn on/off debug/consol messages