update the utility functions from the up to date HRF project