added resizing bit to matrix import