updating selected attribute