adding in cleaning up of wMatrix