working

TODO: compress learn matrix.