refactored layout