updated layout; added comments for flow