optimized: 5.03 s