code moveing from .h to .cpp