partly done, matrix interface is part of #90