added ID mechanism to store shapes.