Handle multiple inputs