reorganized to separate logic, tests, and output