better way of getting current branch