Implements update and merge