finished box polygons and misc funtions