fixed: now it can compile and run on Mac OS