updating offset