moved methods to cpp file