add before render hook
Merge pull request #33 from carrot/before-render

Add before render hook