allow for a variable number of inputs, up to 5