added some comments
realize m-estimate
handled the continuous data