added functionality to get branches