added enable output flag