better mac func