add scalar to make sure array length is checked