added afterselect callback