use last index of instead