arg checking added