get rid of debug msg + correct nodes[] indice issue