optimized 191 with dynamic programming