Completed 7 and 8. Changed display function to be dynamic.