implement Mutex class