refactored laouts