working on refactoring the layout