Patch function

outputs to right window