Adjust to support multiple inputs at once