did index of max element in array