Replace C DMP with lua DMP