seperated code in layout