added mulit inputs