add lazy render according to https://gist.github.com/cjoudrey/1341747