added reference range support

Change-Id: Iae5d53366dae4c644e242d0f8ffac16c656d4ce1
Signed-off-by: Jeremy Ho <jujaga@gmail.com>