Modified the goto to use inputs instead of outputs.