added nodedestroy func