inital commit, working 3 threads with mutex, TODO: 2 and 1 threads