moved readdimvars to helpers