some optimizations (where to place tbl)