update index and layout