Let's make this more flexible to handle different layout configurations