split functionality from header files to seperate cpp files