another attempt at mutexes