rough implementation of images by reference