tmp commit fo saving work. it is compilable on linux but several commenting out in the code made some tools not working