decided to just do it in C++