reorganizing for tests