modified that the virtual boundary is added to the mesh, still has some issue though