move a function from .h to .cpp