change a layout routine, but still got some searching bug