update layout & index