passing branch as parameter, too