added macfile, partial d matching