Adding logic to enable output port