replaced stub with quick and dirty java -> c++ conversion; first tests OK