Updated the dimId and changed it to a global var