Delete Function modified