hw5 code done