Code for mac simplecv