adding merge method.