new version

more commands support, rewrote in c++