seperating out layout logic from data that defines layout