move code out into its own cpp file... in prog