cleaned up conditions in output handlers