update index and add more tests