debug, cleanup