before layouts