added simple debug mode