updated off by 1