fixed bugs in c++ code and added possibility of adding and editing groups