first cut refactoring unit tests