moved out nb js stuff to nb.js