move sub function -> class member