adding boxes to the diagram