works for the lower bound test case with some hardcoded array sizes