adding a debug mode