index function is added