skeleton of an Octave implementation