cleanup for output