added tests and updated index