memory management stuff and geometric shapes