adding patient image functionality