manual merge, refactor tests and add scaffolding as needed