inline function should be put in class.h