update twosum