change setupDimensions to convert 'margin' into an object