add some flags and o3 optimizations