HW6 first edit - fixed errors