works on a large number of 1s.