syncronization with mutex