add functionality for multiple inputs