changed current branch detection using data from reinh.com