not working for 2 inputs and 1 ouputs