change code to better selection