Added devin's changes from bitbucket