I was using indexOf(i) but it doesn't seem like its right ?