Updated to run on Mac