Added isSelected functionality