check number of args in calling new()