optimization with -O3 flag