Changes on the Delete Function