existing code from bitbucket