I'm not sure if this was what the homework was asking for but i did it anyways