select mechanism almost working