add layout and complete index