- added debug functionality, untested