now takes files as arguments