added a bounding box check before intersection search

and i wanted to commit it for reference, but it actually seems to be
slower, so i'm gonna revert it right after.