now taking files as arguments