first working version of selector