initialize fn in dot_ref