modified to run with args