update to return matrix if no callback is specified