add comments / docstrings for layout function to illustrate where