support array of inputs