better way to get those branches without using files