working with Octave, but slow