some nerdtree conditional logic added