Add array_flip instead of searching all of the array