added index creation if not exists