moved ctor and function to cpp file

because conventions are there for a reason