Optimized variant for renderer ( second version - works )