fixes bounding box bug
adds BB test for polygon