added possibility to select preferred branch