move production code into its own class