Converted to use longArray instead of array