merge3 and unit tests