Added support for multiple input lists