perform argument length check