duplicating source and adding tests to avoid regression when refactoring