refactoring and adding to bitbucket