apply layout