implement swdelete