move method from header to .cpp