adapts a bit to octave