refactor delete/unlink