added macg stuff