added support for upper/lower boundary