Implemented in C++