made changes to onselected handlers. looks nicer now