Changed mutex according to the data structure that designed by instructor.