build function refactored
get current branch via xml to js