modifying shist to accept a matrix
fixing conflicts