updated to use new node middleware