debugging, cleaning up output