implemented mesh class