refactor tests, redesign index