modify mutex and randchar