optimizing and enhancing the new geometry generator