I changed a lot of things about the index and path

Not working the index calculation, but the select event is working