added master branch -removed global variable