Added function to get reference image