fixed reference code