now supports multiple file inputs