implement function doAdjust()