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