removing residual images