added method for releasing photo