layout, uncommented crucial code