more refactoring - more tests failing