very slow lmoma implementation