added ensure index