adding -O4 flag to speed up code!