Changes to output and logic