updateShift method added.