should be < len not <=