hw3 ecc and mat completed correctly