move into cpp
add a SOP example