added new facet method and mesh generation