ordinary reduce works now
switch len to ordinary reduce