please distinguish as much as possible function definitions and implementations:

implementations should be put in .cpp files and definitions in .h