updated the func of class added delete