intermediate cleanup