add delete former plan function