Rewrite for Mavericks