inline function has to be defined in the header file