update rowt.js to return function object