fixes #2

Implemented `upperBound` to handle N-length values.