update and add dual likelihood

why clone here?
our usual standard is to return the vector to the same memory, and if people want to modify, they clone themselves.