changes to prog meshes algo