working version w sorted dropdown