helper functions to replace some of the json refs