change Op to return matrix; change function to return either tuple or matrix
fix typo in docstring