Finally got index funcional