got index working how it shoul