refactor octave module, make class