merge and unit tests