refactored layout some more