changed the Data attribute from num to id in the delete function