Added onselect event