some examples to work from
my swig stuff looks different to the author