modify some layout
merge mygoare's code