nicer arg handling, and in a better place