Work in progress on task 3,4.