Added C++ version from 2006