some debug output, simplified helpers