improve arg handling