Fix: optimization and tabulation