when computing hrns, try to use SFA code first, otherwise resort to a local version