message class
add MCDS final algorithm