update d and s index