Finished homework4

did i do this right?