finished dimensions.js