refactor selector auto-complete