use dependency injection for display output and tests