Changed to OSX specific mark function