Update render.js

Following callback pattern