layout refactored