refactor: render is a real function (acts on arguments only), so we can easily include it somewhere in a lib or similar