added isMatrix to sugar functions