changing refs in code