new tests and adapting to refactor