Finished answer for exercize 7 in data structures