some changes in layout plus Yilin code