move parseSelector to a dedicated method