added code for previously acquired images