added argument count check