add function to do merge, but it doesn't work well, it needs to be implemented in the new version, with arbitrary dimensions
mathonaxis basic implementation, but not flexible
add mathondim and merge