add startNode and endNode dispatch, change output to custom stream