finish selec.cpp scanselect.cpp