adding delete image function