Faster lmoma
Merged joao's room method