moved arg checking