updates the offset