made improvements to assignment 6.2