merge the code of dami