divide the code into headers and cpp's