off by one errors FTW