Xinyi: finished a prototype of M4, all requirements fulfilled