tweaked avgWeight API to replace && with \and