Implemented Matrix Integer version