move code from hh to cc