allow locals in render method

I made a small change to the render method that enables the usage of locals.
A test and documentation for the render method are included.