faster collision detection using lookup table