add more midp code