using first value of array