worked out the layout