Could just move this up to the declaration of ```selected``` and save a line.