#15: layout refactoring