improved argv parsing