updating sample code on index