refactor unlink