off by one error?