moving implementation to main cpp file