a demo code using bmrm lib