consider the case of overflow
update