fixed O number-- length was off by 1