Added number of dimensions to output.