move some functions to a new cpp file