refactor for layout and language