fix unit tests after factoring