write first
reuse argv and argvlen