Modified to take multiple input fles