added delete function with headers