update index and style