proof of concept done in c++ now