Added -O3 optimization