precomputed tables code