Update hw3.ml

Base code from hw2