extend reference code