Added -O2 to alleviate stack overflow