enhance on change selected state handler