Declare toggleSelected as a method