remove logging statements
define common function updateDimensions