more cleanup, more logic to handle printing