get references and add to json