fix reference code