change layout and refactoring