add layout and cache