now also accepts files as arguments