added check for which branch to pull during build