made all changes noted in last commit