update index
sort out file layout