merge http://sourceforge.net/p/me722-cm/code/