Function amended. 'ds.dim' not ready yet.