added support for multiple input files