changed getMatBounds() to getValueBounds(), changed copies of bounding box points to references