changed hw3 prob2