replaced custom debug fn with debug module