Remove unuse code
Extract invalid range condition
Create toString function to return String form of Set
Rearrange function