updates to mesh class to support different formats