Adding a default index function