update to add mutex stuff