make a loop to process arguments