added after_render hook