changed optimization flag to -O3