working clean up output