fixed a couple issues with hw5