pursuing refactoring. started a test suite