started doing it in plain old c++