completed hw3 v1.0 before attemption ec