Loopify, and use einsum