bunch of debug clauses