change reference to referenceId