analyzing shapes for the layout