added debug variable to firmware