Changed input to work with multiple files.