dim function

Get dimension