Rough version, of following going - very rough no clean up - but rough idea seems to work
Moving to CLION