more off by 1 cleanups
got rid of magic number in test case