refined select and update