commit latest changes by Peter on using xscope as select handler