working on simple and dynamic index