modified from datalist to selected