the souse code for river.js