refactoring layout.