revised mesh creation stuff