optimize responsive body class update