hw5 done as one file