now compatible with mesh data, just need to tweak and add writeout capability