fixed loop in mi & cmi and added a demo script