before filling in layout
finished try 2