refactored layouts file