implemented save in mesh generator