changes to boundingbox condition