refactor demo_mom example