arg checking improved