Trying again ...

It would be preferable to create an object to store the pictures to delete instead of a global variable.