How to extend my Sketch for Multiple Inputs and Outputs