begin to write img delete functionality