fixed a bug, removed dependency on boost, switched to c++11 -> mutex & thread