bug todo
debug_log util
pipeline optimisation: spurious cat removals