changed locate to array