parsing args, mostly complete