moved impl to cpp
get_hash() etc.