move rez helper routines to rez_helpers.go