compiles with mutex