updated the imaging functions