avoid re-declaring variablaes inside rendering loop.