improved dynamic select