read dimensions and type