Added lookup table for better performance

Caching yay.