This is hw2 for cs385