got debug mode working