added nodeExists()