split into hpp and cpp