added argument check