added figure function (wireframe) and statistics