refactor for highf.in compatability