initialize mesh pointer properly